package com.tyust.lawyermanager.dongao.mapper;

import com.tyust.lawyermanager.dongao.entity.Lawyer;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 律师档案操作：创建律师档案，查询，删除，修改
 * @author gaojian
 */
@Mapper
public interface LawyerMapper {
    public int deleteLawyer(int lawyerid);
    /**
     * 添加律师（创建律师档案）
     * @param lawyer 包含律师信息的对象
     * @return 如果创建成功放回1
     */
    public int insertLawyer(Lawyer lawyer);

    /**
     * 查询所有律师
     * @return
     */
    public List<Lawyer> selectLawyer();

    /**
     * 按照编号查询律师
     * @param lawyerid 律师编号
     * @return 查询得到的律师对象
     */
    public Lawyer selectLawyerById(int lawyerid);

    /**
     * 修改律师
     * @param lawyer 律师对象，包含律师的所有信息
     * @return 修改成功
     */
    public int updateLawyer(Lawyer lawyer);
}






